<?php

/**
 * Caracteristica form base class.
 *
 * @package    Tesis
 * @subpackage form
 * @author     Your name here
 */
class BaseCaracteristicaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                => new sfWidgetFormInputHidden(),
      'nombre'            => new sfWidgetFormInput(),
      'abreviatura'       => new sfWidgetFormInput(),
      'descripcion'       => new sfWidgetFormTextarea(),
      'categoria_id'      => new sfWidgetFormInput(),
      'caracteristica_id' => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'                => new sfValidatorPropelChoice(array('model' => 'Caracteristica', 'column' => 'id', 'required' => false)),
      'nombre'            => new sfValidatorString(array('max_length' => 20)),
      'abreviatura'       => new sfValidatorString(array('max_length' => 4)),
      'descripcion'       => new sfValidatorString(array('required' => false)),
      'categoria_id'      => new sfValidatorInteger(),
      'caracteristica_id' => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('caracteristica[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Caracteristica';
  }


}
